package day9;

import java.util.Scanner;

public class demo2 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        if (n<=2) System.out.println(n);
        else {
            int []t=new int[n+1];
            t[0]=0;
            t[1]=1;
            t[2]=2;
            for (int i = 3; i <=n ; i++) {
t[i]=t[i-1]+t[i-2];
            }
            System.out.println(t[n]);
        }
    }
}
